You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > Matrix Structure > Matrix Methods > NormL2 Method > Matrix.NormL2 Method ([In] TDenseMtxVec, bool)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Matrix.NormL2 Method ([In] TDenseMtxVec, bool)

The L2-norm.

Syntax
C#
Visual Basic
public double NormL2([In] TDenseMtxVec Vec, bool RelativeError);

Calculates the L2 norm : ||V-Vec||, where V is calling Matrix. If the NormL2 is called without any parameters, the NormL2 calculates the norm of calling Matrix. The L2 norm of ||V-Vec|| is defined by the formula: 

 

If RelativeError is true then the computed norm is divided by the norm of V, and the function returns the "relative error": 

 

var a,b: Matrix; c: double; begin a.SetIt(1,4,False,[1,2,3,4]); b.SetIt(1,4,False,[4,3,2,1]); c := a.NormL2(b,True); // or c := NormL2(a,b,true); end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!